#pragma once
#include<iostream>
#include"string.h"
#include<vector>
#include <deque>
namespace jz {
	template<class T, class Container = deque<T>>
	class stack {
	public:
		void push(const T& x)
		{
			_con.push_back(x);
		}
		void pop()
		{
			_con.pop_back();
		}
		const T& top()
		{
			return _con.back();
		}
		size_t size()
		{
			return _con.size();
		}
		bool empty()
		{
			return _con.empty();
		}
	private:
		Container _con;
	};
	void test_stack()
	{
		stack<int, std::vector<int>> s;
		//bit::stack<int, list<int>> s;
		//bit::stack<int, deque<int>> s;
		//bit::stack<int> s;

		s.push(4);
		s.push(3);
		s.push(2);
		s.push(1);

		while (!s.empty())
		{
			cout << s.top() << " ";
			s.pop();
		}
		cout << endl;
	}
}
